package org.shiwen.week8;

import org.shiwen.week5.answer.IsPrime.*;

import java.util.Scanner;


import static org.shiwen.week5.answer.IsPrime.isPrime;

public class week8 {
    public static void main(String[] args) {
        Super super1 = new Super();
        Zi zi = new Zi();
        //instanceof的作用是判断一个对象是不是由右边的类创建出来的
        System.out.println(super1 instanceof Super);
        //instanceof 如果右边的类名是左边的对象创建的类或者是其父类，结果为true
        System.out.println(zi instanceof Super);
        System.out.println(super1 instanceof Zi);
        System.out.println(zi instanceof Zi);
    }
}
